package cn.coder.mybatis.javamail.model;

import java.util.Properties;

/**
 * Created by threegrand2 on 15-1-7.
 */
public class SendEmail {

    private String fromAddress;
    private String sendTime;
    private String content;
    private String mailServerHost;
    private String mailServerPort= "25";
    private String toAddress;
    private String subject;
    private boolean validate = false;
    private String title;                   //
    private String userName;
    private String userPass;
    private String attachFileName[];

    //设置邮件会话属性
    public Properties getMailProperties(){
        Properties properties = new Properties();
        properties.put("mail.smtp.host",this.mailServerHost);
        properties.put("mail.smtp.port",this.mailServerPort);
        properties.put("mail.smtp.auth",validate ? "true":"false");
        return  properties;
    }

    public String getMailServerHost() {
        return mailServerHost;
    }

    public void setMailServerHost(String mailServerHost) {
        this.mailServerHost = mailServerHost;
    }

    public boolean isValidate() {
        return validate;
    }

    public void setValidate(boolean validate) {
        this.validate = validate;
    }

    public String getFromAddress() {
        return fromAddress;
    }

    public void setFromAddress(String fromAddress) {
        this.fromAddress = fromAddress;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getMailServerPort() {
        return mailServerPort;
    }

    public void setMailServerPort(String mailServerPort) {
        this.mailServerPort = mailServerPort;
    }

    public String getToAddress() {
        return toAddress;
    }

    public void setToAddress(String toAddress) {
        this.toAddress = toAddress;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUserPass() {
        return userPass;
    }

    public void setUserPass(String userPass) {
        this.userPass = userPass;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String[] getAttachFileName() {
        return attachFileName;
    }

    public void setAttachFileName(String[] attachFileName) {
        this.attachFileName = attachFileName;
    }
}
